<?php

define("_SessionName", "queryRecord");
require("header.php");

$sql = "SELECT * FROM `sport_motion` WHERE `master`={$_POST["master"]} AND 
`mStartTime`={$_POST["startTime"]} AND `mEndTime`={$_POST["endTime"]}";

// echo $sql . "\n";

$result = $conn->query($sql);

if ($result->num_rows > 0) {
    $row = $result->fetch_assoc();
}
else {
    $row = null;
}

echo json_encode($row);
 
$conn->close();

?>